import * as types from "./types";




const mutations = {
  [types.HIDE_LOADING](state) {
    state.loading = false;
  },
  [types.SHOW_LOADING](state) {
    state.loading = true;
  },
  [types.LOGIN](state, token) {
    state.token = token;
    window.localStorage.setItem('AppToken', token);
  },
  [types.LOGINOUT](state) {
    state.token = null;
    window.localStorage.removeItem('AppToken');
  }
}

export default mutations






